In a data processor, information is typically stored in data files, wherein the data processors comprise an arrangement for processing such files. Information about each file is usually entered in a so-called directory, wherein the stored file can be retrieved later for processing. In many cases, such an entry in the file directory comprises e.g. the time of creating the file (date and time), the time of editing the file, the file name, the directory path, the file size, the file type, and possibly also information about whether the file has been edited e.g. after the latest backup copy was made.
In the data processor, the files are normally stored in a storage means in a disk drive unit, which storage means can be e.g. a fixed disk, a diskette, a memory card, or the like. Such storage means are normally divided into memory units of equal sizes, i.e. so-called sectors, wherein the file to be stored is divided into elements having the size of the memory units, and each element of the file is stored in one memory unit. Thus, the file directory or the file itself contains information about which memory units are used for the storage of said file and what is the correct order of the memory units. In one operating system, a so-called file allocation table (FAT) is used for storing information about the file to which each sector belongs and also the next/preceding memory unit. The file can thus be retrieved from the storage means by examining the information of the file allocation table. In practice, the data files can be physically stored on the storage means in a very fragmented way. However, each file constitutes a logical entity which is processed by the operating system of the data processor, for example, by means of said file allocation table, or the like. Thus, the applications can also process the file as a single logical entity.
In some systems, it is also possible to use so-called backup copying of files, wherein the same file is stored in two or more copies. In this case, the file can be restored either from an intact backup copy or by combining flawless parts from several copies. In view of the applications, however, it is a single file.
Files can be deleted from a storage means by selecting a file to be deleted from a directory and by entering a command to delete the file. What takes place when the file is deleted will depend, for example, on the operating system used in the data processor. In one operating system, a file is deleted by replacing the first letter in the file name in the directory with a given symbol, in which case the file is not displayed when the directory is browsed, and parts which have contained stored information of said file in the memory of the data processor are marked as being free. Thus, these parts of the memory, marked to be free, can be used for storing other files.
In another operating system, data files are deleted in such a way that the data is transferred into a so-called recycle bin, wherein the content of the data file is stored in a kind of wastebasket file. At this stage, the content of the data file to be deleted can also be compressed so that the data file transferred to the wastebasket will require less space. Thus, the file can be restored by retrieving it from the wastebasket. On the other hand, the file can be deleted finally by removing it from the wastebasket, after which, in practice, the file can no longer be recovered. It should be noted that the transfer of the file into the wastebasket does not necessarily mean that the physical data of the file were transferred to another location, but the transfer into the wastebasket can be made in a kind of logical way, for example, by marking the memory units allocated for the file to belong to the wastebasket. This can be done, for example, by changing the values of the file pointers in such a way that, with respect to the data processor, the file is processed as if it were stored in the wastebasket. These memory units are thus not completely released for rewriting, but they are still available.
The data deleting systems of prior art have some drawbacks, particularly if the possibility to recover a deleted file should be provided. If the file is deleted by removing its data from the file directory, the file can be recovered, in practice, as long as no new information has been stored in any of the sectors used for storing the file. When any other information has been stored in any one of such sectors, the original file cannot be recovered, at least not completely. In data processors with relatively little storage capacity, released sectors are normally used for other purposes relatively soon, wherein a deleted file can normally not be restored any longer. Accordingly, in operating systems applying said wastebasket, this wastebasket requires storage capacity, which limits considerably the use of the memory for other purposes, particularly in the case of portable data processors with a storage means of a relatively small size. On the other hand, when the wastebasket is used, there may be a need to reduce the size of the wastebasket to be so small that it will only take in a few deleted files at a time. Because such a wastebasket is filled up relatively quickly, the number of files in the wastebasket must be kept relatively small. Also in this case, it is often impossible to restore files in practice.